/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Ui;

/**
 *
 * @author Esteban
 */
import com.michaelbaranov.microba.calendar.DatePicker;
import java.beans.PropertyVetoException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.TimeZone;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class DatePickerExample extends JPanel {

    public static void main(String[] args) {
        JFrame frame = new JFrame("JXPicker Example");
        JPanel panel = new JPanel();

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setBounds(400, 400, 250, 100);

        DatePicker picker = new DatePicker();
        
        try {
            picker.setDate(Calendar.getInstance(TimeZone.getTimeZone("GMT-6")).getTime());
        } catch (PropertyVetoException f) {}
        picker.setDateFormat(new SimpleDateFormat("dd-MM-yyyy"));
        

        panel.add(picker);
        frame.getContentPane().add(panel);

        frame.setVisible(true);
    }
}
